package com.baizan.daka.mvp.model

import com.baizan.daka.mvp.model.bean.PackageBean
import com.baizan.daka.net.BasePageResponse
import com.baizan.daka.net.bean.BasePageParam
import com.baizan.daka.net.bean.TaskParamBean
import com.baizan.daka.util.SchedulerUtils
import com.hazz.kotlinmvp.net.BaseResponse
import com.hazz.kotlinmvp.net.RetrofitManager
import io.reactivex.Observable

class VipModel {

    fun vipList(pageNo: Int): Observable<BaseResponse<BasePageResponse<PackageBean>>> {

        return RetrofitManager.service.packagesList(
            BasePageParam(pageNo, TaskParamBean())
        ).compose(SchedulerUtils.ioToMain())
    }
}